package com.raven.craft.code.generator.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @author raven
 * @date 2019-03-07 16:57
 */
@Getter
@AllArgsConstructor
public enum MySqlKeyword {

    ACCESSIBLE("ACCESSIBLE"),
    ACCOUNT("ACCOUNT"),
    ACTION("ACTION"),
    ADD("ADD"),
    AFTER("AFTER"),
    AGAINST("AGAINST"),
    AGGREGATE("AGGREGATE"),
    ALGORITHM("ALGORITHM"),
    ALL("ALL"),
    ALTER("ALTER"),
    ALWAYS("ALWAYS"),
    ANALYSE("ANALYSE"),
    ANALYZE("ANALYZE"),
    AND("AND"),
    ANY("ANY"),
    AS("AS"),
    ASC("ASC"),
    ASCII("ASCII"),
    ASENSITIVE("ASENSITIVE"),
    AT("AT"),
    AUTOEXTEND_SIZE("AUTOEXTEND_SIZE"),
    AUTO_INCREMENT("AUTO_INCREMENT"),
    AVG("AVG"),
    AVG_ROW_LENGTH("AVG_ROW_LENGTH"),
    BACKUP("BACKUP"),
    BEFORE("BEFORE"),
    BEGIN("BEGIN"),
    BETWEEN("BETWEEN"),
    BIGINT("BIGINT"),
    BINARY("BINARY"),
    BINLOG("BINLOG"),
    BIT("BIT"),
    BLOB("BLOB"),
    BLOCK("BLOCK"),
    BOOL("BOOL"),
    BOOLEAN("BOOLEAN"),
    BOTH("BOTH"),
    BTREE("BTREE"),
    BY("BY"),
    BYTE("BYTE"),
    CACHE("CACHE"),
    CALL("CALL"),
    CASCADE("CASCADE"),
    CASCADED("CASCADED"),
    CASE("CASE"),
    CATALOG_NAME("CATALOG_NAME"),
    CHAIN("CHAIN"),
    CHANGE("CHANGE"),
    CHANGED("CHANGED"),
    CHANNEL("CHANNEL"),
    CHAR("CHAR"),
    CHARACTER("CHARACTER"),
    CHARSET("CHARSET"),
    CHECK("CHECK"),
    CHECKSUM("CHECKSUM"),
    CIPHER("CIPHER"),
    CLASS_ORIGIN("CLASS_ORIGIN"),
    CLIENT("CLIENT"),
    CLOSE("CLOSE"),
    COALESCE("COALESCE"),
    CODE("CODE"),
    COLLATE("COLLATE"),
    COLLATION("COLLATION"),
    COLUMN("COLUMN"),
    COLUMNS("COLUMNS"),
    COLUMN_FORMAT("COLUMN_FORMAT"),
    COLUMN_NAME("COLUMN_NAME"),
    COMMENT("COMMENT"),
    COMMIT("COMMIT"),
    COMMITTED("COMMITTED"),
    COMPACT("COMPACT"),
    COMPLETION("COMPLETION"),
    COMPRESSED("COMPRESSED"),
    COMPRESSION("COMPRESSION"),
    CONCURRENT("CONCURRENT"),
    CONDITION("CONDITION"),
    CONNECTION("CONNECTION"),
    CONSISTENT("CONSISTENT"),
    CONSTRAINT("CONSTRAINT"),
    CONSTRAINT_CATALOG("CONSTRAINT_CATALOG"),
    CONSTRAINT_NAME("CONSTRAINT_NAME"),
    CONSTRAINT_SCHEMA("CONSTRAINT_SCHEMA"),
    CONTAINS("CONTAINS"),
    CONTEXT("CONTEXT"),
    CONTINUE("CONTINUE"),
    CONVERT("CONVERT"),
    CPU("CPU"),
    CREATE("CREATE"),
    CROSS("CROSS"),
    CUBE("CUBE"),
    CURRENT("CURRENT"),
    CURRENT_DATE("CURRENT_DATE"),
    CURRENT_TIME("CURRENT_TIME"),
    CURRENT_TIMESTAMP("CURRENT_TIMESTAMP"),
    CURRENT_USER("CURRENT_USER"),
    CURSOR("CURSOR"),
    CURSOR_NAME("CURSOR_NAME"),
    DATA("DATA"),
    DATABASE("DATABASE"),
    DATABASES("DATABASES"),
    DATAFILE("DATAFILE"),
    DATE("DATE"),
    DATETIME("DATETIME"),
    DAY("DAY"),
    DAY_HOUR("DAY_HOUR"),
    DAY_MICROSECOND("DAY_MICROSECOND"),
    DAY_MINUTE("DAY_MINUTE"),
    DAY_SECOND("DAY_SECOND"),
    DEALLOCATE("DEALLOCATE"),
    DEC("DEC"),
    DECIMAL("DECIMAL"),
    DECLARE("DECLARE"),
    DEFAULT("DEFAULT"),
    DEFAULT_AUTH("DEFAULT_AUTH"),
    DEFINER("DEFINER"),
    DELAYED("DELAYED"),
    DELAY_KEY_WRITE("DELAY_KEY_WRITE"),
    DELETE("DELETE"),
    DESC("DESC"),
    DESCRIBE("DESCRIBE"),
    DES_KEY_FILE("DES_KEY_FILE"),
    DETERMINISTIC("DETERMINISTIC"),
    DIAGNOSTICS("DIAGNOSTICS"),
    DIRECTORY("DIRECTORY"),
    DISABLE("DISABLE"),
    DISCARD("DISCARD"),
    DISK("DISK"),
    DISTINCT("DISTINCT"),
    DISTINCTROW("DISTINCTROW"),
    DIV("DIV"),
    DO("DO"),
    DOUBLE("DOUBLE"),
    DROP("DROP"),
    DUAL("DUAL"),
    DUMPFILE("DUMPFILE"),
    DUPLICATE("DUPLICATE"),
    DYNAMIC("DYNAMIC"),
    EACH("EACH"),
    ELSE("ELSE"),
    ELSEIF("ELSEIF"),
    ENABLE("ENABLE"),
    ENCLOSED("ENCLOSED"),
    ENCRYPTION("ENCRYPTION"),
    END("END"),
    ENDS("ENDS"),
    ENGINE("ENGINE"),
    ENGINES("ENGINES"),
    ENUM("ENUM"),
    ERROR("ERROR"),
    ERRORS("ERRORS"),
    ESCAPE("ESCAPE"),
    ESCAPED("ESCAPED"),
    EVENT("EVENT"),
    EVENTS("EVENTS"),
    EVERY("EVERY"),
    EXCHANGE("EXCHANGE"),
    EXECUTE("EXECUTE"),
    EXISTS("EXISTS"),
    EXIT("EXIT"),
    EXPANSION("EXPANSION"),
    EXPIRE("EXPIRE"),
    EXPLAIN("EXPLAIN"),
    EXPORT("EXPORT"),
    EXTENDED("EXTENDED"),
    EXTENT_SIZE("EXTENT_SIZE"),
    FALSE("FALSE"),
    FAST("FAST"),
    FAULTS("FAULTS"),
    FETCH("FETCH"),
    FIELDS("FIELDS"),
    FILE("FILE"),
    FILE_BLOCK_SIZE("FILE_BLOCK_SIZE"),
    FILTER("FILTER"),
    FIRST("FIRST"),
    FIXED("FIXED"),
    FLOAT("FLOAT"),
    FLOAT4("FLOAT4"),
    FLOAT8("FLOAT8"),
    FLUSH("FLUSH"),
    FOLLOWS("FOLLOWS"),
    FOR("FOR"),
    FORCE("FORCE"),
    FOREIGN("FOREIGN"),
    FORMAT("FORMAT"),
    FOUND("FOUND"),
    FROM("FROM"),
    FULL("FULL"),
    FULLTEXT("FULLTEXT"),
    FUNCTION("FUNCTION"),
    GENERAL("GENERAL"),
    GENERATED("GENERATED"),
    GEOMETRY("GEOMETRY"),
    GEOMETRYCOLLECTION("GEOMETRYCOLLECTION"),
    GET("GET"),
    GET_FORMAT("GET_FORMAT"),
    GLOBAL("GLOBAL"),
    GRANT("GRANT"),
    GRANTS("GRANTS"),
    GROUP("GROUP"),
    GROUP_REPLICATION("GROUP_REPLICATION"),
    HANDLER("HANDLER"),
    HASH("HASH"),
    HAVING("HAVING"),
    HELP("HELP"),
    HIGH_PRIORITY("HIGH_PRIORITY"),
    HOST("HOST"),
    HOSTS("HOSTS"),
    HOUR("HOUR"),
    HOUR_MICROSECOND("HOUR_MICROSECOND"),
    HOUR_MINUTE("HOUR_MINUTE"),
    HOUR_SECOND("HOUR_SECOND"),
    IDENTIFIED("IDENTIFIED"),
    IF("IF"),
    IGNORE("IGNORE"),
    IGNORE_SERVER_IDS("IGNORE_SERVER_IDS"),
    IMPORT("IMPORT"),
    IN("IN"),
    INDEX("INDEX"),
    INDEXES("INDEXES"),
    INFILE("INFILE"),
    INITIAL_SIZE("INITIAL_SIZE"),
    INNER("INNER"),
    INOUT("INOUT"),
    INSENSITIVE("INSENSITIVE"),
    INSERT("INSERT"),
    INSERT_METHOD("INSERT_METHOD"),
    INSTALL("INSTALL"),
    INSTANCE("INSTANCE"),
    INT("INT"),
    INT1("INT1"),
    INT2("INT2"),
    INT3("INT3"),
    INT4("INT4"),
    INT8("INT8"),
    INTEGER("INTEGER"),
    INTERVAL("INTERVAL"),
    INTO("INTO"),
    INVOKER("INVOKER"),
    IO("IO"),
    IO_AFTER_GTIDS("IO_AFTER_GTIDS"),
    IO_BEFORE_GTIDS("IO_BEFORE_GTIDS"),
    IO_THREAD("IO_THREAD"),
    IPC("IPC"),
    IS("IS"),
    ISOLATION("ISOLATION"),
    ISSUER("ISSUER"),
    ITERATE("ITERATE"),
    JOIN("JOIN"),
    JSON("JSON"),
    KEY("KEY"),
    KEYS("KEYS"),
    KEY_BLOCK_SIZE("KEY_BLOCK_SIZE"),
    KILL("KILL"),
    LANGUAGE("LANGUAGE"),
    LAST("LAST"),
    LEADING("LEADING"),
    LEAVE("LEAVE"),
    LEAVES("LEAVES"),
    LEFT("LEFT"),
    LESS("LESS"),
    LEVEL("LEVEL"),
    LIKE("LIKE"),
    LIMIT("LIMIT"),
    LINEAR("LINEAR"),
    LINES("LINES"),
    LINESTRING("LINESTRING"),
    LIST("LIST"),
    LOAD("LOAD"),
    LOCAL("LOCAL"),
    LOCALTIME("LOCALTIME"),
    LOCALTIMESTAMP("LOCALTIMESTAMP"),
    LOCK("LOCK"),
    LOCKS("LOCKS"),
    LOGFILE("LOGFILE"),
    LOGS("LOGS"),
    LONG("LONG"),
    LONGBLOB("LONGBLOB"),
    LONGTEXT("LONGTEXT"),
    LOOP("LOOP"),
    LOW_PRIORITY("LOW_PRIORITY"),
    MASTER("MASTER"),
    MASTER_AUTO_POSITION("MASTER_AUTO_POSITION"),
    MASTER_BIND("MASTER_BIND"),
    MASTER_CONNECT_RETRY("MASTER_CONNECT_RETRY"),
    MASTER_DELAY("MASTER_DELAY"),
    MASTER_HEARTBEAT_PERIOD("MASTER_HEARTBEAT_PERIOD"),
    MASTER_HOST("MASTER_HOST"),
    MASTER_LOG_FILE("MASTER_LOG_FILE"),
    MASTER_LOG_POS("MASTER_LOG_POS"),
    MASTER_PASSWORD("MASTER_PASSWORD"),
    MASTER_PORT("MASTER_PORT"),
    MASTER_RETRY_COUNT("MASTER_RETRY_COUNT"),
    MASTER_SERVER_ID("MASTER_SERVER_ID"),
    MASTER_SSL("MASTER_SSL"),
    MASTER_SSL_CA("MASTER_SSL_CA"),
    MASTER_SSL_CAPATH("MASTER_SSL_CAPATH"),
    MASTER_SSL_CERT("MASTER_SSL_CERT"),
    MASTER_SSL_CIPHER("MASTER_SSL_CIPHER"),
    MASTER_SSL_CRL("MASTER_SSL_CRL"),
    MASTER_SSL_CRLPATH("MASTER_SSL_CRLPATH"),
    MASTER_SSL_KEY("MASTER_SSL_KEY"),
    MASTER_SSL_VERIFY_SERVER_CERT("MASTER_SSL_VERIFY_SERVER_CERT"),
    MASTER_TLS_VERSION("MASTER_TLS_VERSION"),
    MASTER_USER("MASTER_USER"),
    MATCH("MATCH"),
    MAXVALUE("MAXVALUE"),
    MAX_CONNECTIONS_PER_HOUR("MAX_CONNECTIONS_PER_HOUR"),
    MAX_QUERIES_PER_HOUR("MAX_QUERIES_PER_HOUR"),
    MAX_ROWS("MAX_ROWS"),
    MAX_SIZE("MAX_SIZE"),
    MAX_STATEMENT_TIME("MAX_STATEMENT_TIME"),
    MAX_UPDATES_PER_HOUR("MAX_UPDATES_PER_HOUR"),
    MAX_USER_CONNECTIONS("MAX_USER_CONNECTIONS"),
    MEDIUM("MEDIUM"),
    MEDIUMBLOB("MEDIUMBLOB"),
    MEDIUMINT("MEDIUMINT"),
    MEDIUMTEXT("MEDIUMTEXT"),
    MEMORY("MEMORY"),
    MERGE("MERGE"),
    MESSAGE_TEXT("MESSAGE_TEXT"),
    MICROSECOND("MICROSECOND"),
    MIDDLEINT("MIDDLEINT"),
    MIGRATE("MIGRATE"),
    MINUTE("MINUTE"),
    MINUTE_MICROSECOND("MINUTE_MICROSECOND"),
    MINUTE_SECOND("MINUTE_SECOND"),
    MIN_ROWS("MIN_ROWS"),
    MOD("MOD"),
    MODE("MODE"),
    MODIFIES("MODIFIES"),
    MODIFY("MODIFY"),
    MONTH("MONTH"),
    MULTILINESTRING("MULTILINESTRING"),
    MULTIPOINT("MULTIPOINT"),
    MULTIPOLYGON("MULTIPOLYGON"),
    MUTEX("MUTEX"),
    MYSQL_ERRNO("MYSQL_ERRNO"),
    NAME("NAME"),
    NAMES("NAMES"),
    NATIONAL("NATIONAL"),
    NATURAL("NATURAL"),
    NCHAR("NCHAR"),
    NDB("NDB"),
    NDBCLUSTER("NDBCLUSTER"),
    NEVER("NEVER"),
    NEW("NEW"),
    NEXT("NEXT"),
    NO("NO"),
    NODEGROUP("NODEGROUP"),
    NONBLOCKING("NONBLOCKING"),
    NONE("NONE"),
    NOT("NOT"),
    NO_WAIT("NO_WAIT"),
    NO_WRITE_TO_BINLOG("NO_WRITE_TO_BINLOG"),
    NULL("NULL"),
    NUMBER("NUMBER"),
    NUMERIC("NUMERIC"),
    NVARCHAR("NVARCHAR"),
    OFFSET("OFFSET"),
    OLD_PASSWORD("OLD_PASSWORD"),
    ON("ON"),
    ONE("ONE"),
    ONLY("ONLY"),
    OPEN("OPEN"),
    OPTIMIZE("OPTIMIZE"),
    OPTIMIZER_COSTS("OPTIMIZER_COSTS"),
    OPTION("OPTION"),
    OPTIONALLY("OPTIONALLY"),
    OPTIONS("OPTIONS"),
    OR("OR"),
    ORDER("ORDER"),
    OUT("OUT"),
    OUTER("OUTER"),
    OUTFILE("OUTFILE"),
    OWNER("OWNER"),
    PACK_KEYS("PACK_KEYS"),
    PAGE("PAGE"),
    PARSER("PARSER"),
    PARSE_GCOL_EXPR("PARSE_GCOL_EXPR"),
    PARTIAL("PARTIAL"),
    PARTITION("PARTITION"),
    PARTITIONING("PARTITIONING"),
    PARTITIONS("PARTITIONS"),
    PASSWORD("PASSWORD"),
    PHASE("PHASE"),
    PLUGIN("PLUGIN"),
    PLUGINS("PLUGINS"),
    PLUGIN_DIR("PLUGIN_DIR"),
    POINT("POINT"),
    POLYGON("POLYGON"),
    PORT("PORT"),
    PRECEDES("PRECEDES"),
    PRECISION("PRECISION"),
    PREPARE("PREPARE"),
    PRESERVE("PRESERVE"),
    PREV("PREV"),
    PRIMARY("PRIMARY"),
    PRIVILEGES("PRIVILEGES"),
    PROCEDURE("PROCEDURE"),
    PROCESSLIST("PROCESSLIST"),
    PROFILE("PROFILE"),
    PROFILES("PROFILES"),
    PROXY("PROXY"),
    PURGE("PURGE"),
    QUARTER("QUARTER"),
    QUERY("QUERY"),
    QUICK("QUICK"),
    RANGE("RANGE"),
    READ("READ"),
    READS("READS"),
    READ_ONLY("READ_ONLY"),
    READ_WRITE("READ_WRITE"),
    REAL("REAL"),
    REBUILD("REBUILD"),
    RECOVER("RECOVER"),
    REDOFILE("REDOFILE"),
    REDO_BUFFER_SIZE("REDO_BUFFER_SIZE"),
    REDUNDANT("REDUNDANT"),
    REFERENCES("REFERENCES"),
    REGEXP("REGEXP"),
    RELAY("RELAY"),
    RELAYLOG("RELAYLOG"),
    RELAY_LOG_FILE("RELAY_LOG_FILE"),
    RELAY_LOG_POS("RELAY_LOG_POS"),
    RELAY_THREAD("RELAY_THREAD"),
    RELEASE("RELEASE"),
    RELOAD("RELOAD"),
    REMOVE("REMOVE"),
    RENAME("RENAME"),
    REORGANIZE("REORGANIZE"),
    REPAIR("REPAIR"),
    REPEAT("REPEAT"),
    REPEATABLE("REPEATABLE"),
    REPLACE("REPLACE"),
    REPLICATE_DO_DB("REPLICATE_DO_DB"),
    REPLICATE_DO_TABLE("REPLICATE_DO_TABLE"),
    REPLICATE_IGNORE_DB("REPLICATE_IGNORE_DB"),
    REPLICATE_IGNORE_TABLE("REPLICATE_IGNORE_TABLE"),
    REPLICATE_REWRITE_DB("REPLICATE_REWRITE_DB"),
    REPLICATE_WILD_DO_TABLE("REPLICATE_WILD_DO_TABLE"),
    REPLICATE_WILD_IGNORE_TABLE("REPLICATE_WILD_IGNORE_TABLE"),
    REPLICATION("REPLICATION"),
    REQUIRE("REQUIRE"),
    RESET("RESET"),
    RESIGNAL("RESIGNAL"),
    RESTORE("RESTORE"),
    RESTRICT("RESTRICT"),
    RESUME("RESUME"),
    RETURN("RETURN"),
    RETURNED_SQLSTATE("RETURNED_SQLSTATE"),
    RETURNS("RETURNS"),
    REVERSE("REVERSE"),
    REVOKE("REVOKE"),
    RIGHT("RIGHT"),
    RLIKE("RLIKE"),
    ROLLBACK("ROLLBACK"),
    ROLLUP("ROLLUP"),
    ROTATE("ROTATE"),
    ROUTINE("ROUTINE"),
    ROW("ROW"),
    ROWS("ROWS"),
    ROW_COUNT("ROW_COUNT"),
    ROW_FORMAT("ROW_FORMAT"),
    RTREE("RTREE"),
    SAVEPOINT("SAVEPOINT"),
    SCHEDULE("SCHEDULE"),
    SCHEMA("SCHEMA"),
    SCHEMAS("SCHEMAS"),
    SCHEMA_NAME("SCHEMA_NAME"),
    SECOND("SECOND"),
    SECOND_MICROSECOND("SECOND_MICROSECOND"),
    SECURITY("SECURITY"),
    SELECT("SELECT"),
    SENSITIVE("SENSITIVE"),
    SEPARATOR("SEPARATOR"),
    SERIAL("SERIAL"),
    SERIALIZABLE("SERIALIZABLE"),
    SERVER("SERVER"),
    SESSION("SESSION"),
    SET("SET"),
    SHARE("SHARE"),
    SHOW("SHOW"),
    SHUTDOWN("SHUTDOWN"),
    SIGNAL("SIGNAL"),
    SIGNED("SIGNED"),
    SIMPLE("SIMPLE"),
    SLAVE("SLAVE"),
    SLOW("SLOW"),
    SMALLINT("SMALLINT"),
    SNAPSHOT("SNAPSHOT"),
    SOCKET("SOCKET"),
    SOME("SOME"),
    SONAME("SONAME"),
    SOUNDS("SOUNDS"),
    SOURCE("SOURCE"),
    SPATIAL("SPATIAL"),
    SPECIFIC("SPECIFIC"),
    SQL("SQL"),
    SQLEXCEPTION("SQLEXCEPTION"),
    SQLSTATE("SQLSTATE"),
    SQLWARNING("SQLWARNING"),
    SQL_AFTER_GTIDS("SQL_AFTER_GTIDS"),
    SQL_AFTER_MTS_GAPS("SQL_AFTER_MTS_GAPS"),
    SQL_BEFORE_GTIDS("SQL_BEFORE_GTIDS"),
    SQL_BIG_RESULT("SQL_BIG_RESULT"),
    SQL_BUFFER_RESULT("SQL_BUFFER_RESULT"),
    SQL_CACHE("SQL_CACHE"),
    SQL_CALC_FOUND_ROWS("SQL_CALC_FOUND_ROWS"),
    SQL_NO_CACHE("SQL_NO_CACHE"),
    SQL_SMALL_RESULT("SQL_SMALL_RESULT"),
    SQL_THREAD("SQL_THREAD"),
    SQL_TSI_DAY("SQL_TSI_DAY"),
    SQL_TSI_HOUR("SQL_TSI_HOUR"),
    SQL_TSI_MINUTE("SQL_TSI_MINUTE"),
    SQL_TSI_MONTH("SQL_TSI_MONTH"),
    SQL_TSI_QUARTER("SQL_TSI_QUARTER"),
    SQL_TSI_SECOND("SQL_TSI_SECOND"),
    SQL_TSI_WEEK("SQL_TSI_WEEK"),
    SQL_TSI_YEAR("SQL_TSI_YEAR"),
    SSL("SSL"),
    STACKED("STACKED"),
    START("START"),
    STARTING("STARTING"),
    STARTS("STARTS"),
    STATS_AUTO_RECALC("STATS_AUTO_RECALC"),
    STATS_PERSISTENT("STATS_PERSISTENT"),
    STATS_SAMPLE_PAGES("STATS_SAMPLE_PAGES"),
    STATUS("STATUS"),
    STOP("STOP"),
    STORAGE("STORAGE"),
    STORED("STORED"),
    STRAIGHT_JOIN("STRAIGHT_JOIN"),
    STRING("STRING"),
    SUBCLASS_ORIGIN("SUBCLASS_ORIGIN"),
    SUBJECT("SUBJECT"),
    SUBPARTITION("SUBPARTITION"),
    SUBPARTITIONS("SUBPARTITIONS"),
    SUPER("SUPER"),
    SUSPEND("SUSPEND"),
    SWAPS("SWAPS"),
    SWITCHES("SWITCHES"),
    TABLE("TABLE"),
    TABLES("TABLES"),
    TABLESPACE("TABLESPACE"),
    TABLE_CHECKSUM("TABLE_CHECKSUM"),
    TABLE_NAME("TABLE_NAME"),
    TEMPORARY("TEMPORARY"),
    TEMPTABLE("TEMPTABLE"),
    TERMINATED("TERMINATED"),
    TEXT("TEXT"),
    THAN("THAN"),
    THEN("THEN"),
    TIME("TIME"),
    TIMESTAMP("TIMESTAMP"),
    TIMESTAMPADD("TIMESTAMPADD"),
    TIMESTAMPDIFF("TIMESTAMPDIFF"),
    TINYBLOB("TINYBLOB"),
    TINYINT("TINYINT"),
    TINYTEXT("TINYTEXT"),
    TO("TO"),
    TRAILING("TRAILING"),
    TRANSACTION("TRANSACTION"),
    TRIGGER("TRIGGER"),
    TRIGGERS("TRIGGERS"),
    TRUE("TRUE"),
    TRUNCATE("TRUNCATE"),
    TYPE("TYPE"),
    TYPES("TYPES"),
    UNCOMMITTED("UNCOMMITTED"),
    UNDEFINED("UNDEFINED"),
    UNDO("UNDO"),
    UNDOFILE("UNDOFILE"),
    UNDO_BUFFER_SIZE("UNDO_BUFFER_SIZE"),
    UNICODE("UNICODE"),
    UNINSTALL("UNINSTALL"),
    UNION("UNION"),
    UNIQUE("UNIQUE"),
    UNKNOWN("UNKNOWN"),
    UNLOCK("UNLOCK"),
    UNSIGNED("UNSIGNED"),
    UNTIL("UNTIL"),
    UPDATE("UPDATE"),
    UPGRADE("UPGRADE"),
    USAGE("USAGE"),
    USE("USE"),
    USER("USER"),
    USER_RESOURCES("USER_RESOURCES"),
    USE_FRM("USE_FRM"),
    USING("USING"),
    UTC_DATE("UTC_DATE"),
    UTC_TIME("UTC_TIME"),
    UTC_TIMESTAMP("UTC_TIMESTAMP"),
    VALIDATION("VALIDATION"),
    VALUE("VALUE"),
    VALUES("VALUES"),
    VARBINARY("VARBINARY"),
    VARCHAR("VARCHAR"),
    VARCHARACTER("VARCHARACTER"),
    VARIABLES("VARIABLES"),
    VARYING("VARYING"),
    VIEW("VIEW"),
    VIRTUAL("VIRTUAL"),
    WAIT("WAIT"),
    WARNINGS("WARNINGS"),
    WEEK("WEEK"),
    WEIGHT_STRING("WEIGHT_STRING"),
    WHEN("WHEN"),
    WHERE("WHERE"),
    WHILE("WHILE"),
    WITH("WITH"),
    WITHOUT("WITHOUT"),
    WORK("WORK"),
    WRAPPER("WRAPPER"),
    WRITE("WRITE"),
    X509("X509"),
    XA("XA"),
    XID("XID"),
    XML("XML"),
    XOR("XOR"),
    YEAR("YEAR"),
    YEAR_MONTH("YEAR_MONTH"),
    ZEROFILL("ZEROFILL"),
    ;

    private final String word;

    /**
     * 验证 field 是否为 mysql 的保留字
     *
     * @param field
     * @return
     */
    public static boolean contain(String field) {
        return Arrays.stream(MySqlKeyword.values())
                .collect(Collectors.toSet())
                .contains(field.toUpperCase());
    }
}
